/*!
 * \file ems_xstream.h
 *
 * \brief 主要对应TibjmsxStream类
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.
 *
 * \version 1.0
 * \author songbb
 * \date 2016/10/24
 *
 */

#ifndef __EMS_XSTREAM_H_
#define __EMS_XSTREAM_H_

int ems_readUnsignedByte(L7_ems_packet *p_st_ems_packet
                        , unsigned char *p_uc_out);

int ems_readByte(L7_ems_packet *p_st_ems_packet
                , char *p_c_out);

int ems_readBoolean(L7_ems_packet *p_st_ems_packet
                    , char *p_c_out);

int ems_readUnsignedShort(L7_ems_packet *p_st_ems_packet
                        , unsigned short *p_us_out);

int ems_readChar(L7_ems_packet *p_st_ems_packet
                , short *p_s_out);

int ems_readShort(L7_ems_packet *p_st_ems_packet
                , short *p_s_out);

int ems_readInt(L7_ems_packet *p_st_ems_packet
                , int *p_i_out);

int ems_readLong(L7_ems_packet *p_st_ems_packet
                , long long *p_ll_out);

int ems_readFloat(L7_ems_packet *p_st_ems_packet
                , float *p_f_out);

int ems_readDouble(L7_ems_packet *p_st_ems_packet
                , double *p_d_out);

int ems_readBytes(L7_ems_packet *p_st_ems_packet
                , char **pp_out
                , int *p_i_out_len);

int ems_skipShort(L7_ems_packet *p_st_ems_packet);

int ems_skipInt(L7_ems_packet *p_st_ems_packet);

int ems_skipLong(L7_ems_packet *p_st_ems_packet);

int ems_skipFloat(L7_ems_packet *p_st_ems_packet);

int ems_skipDouble(L7_ems_packet *p_st_ems_packet);

int ems_readVarLong(L7_ems_packet *p_st_ems_packet
                    , long long *p_ll_out);

int ems_skipVarLong(L7_ems_packet *p_st_ems_packet);

int ems_getTibjmsEncoding(L7session_ems *p_st_sess);

int ems_readString(L7session_ems *p_st_sess
                , L7_ems_packet *p_st_ems_packet
                , int i_boolean
                , char **pp_out
                , int *p_i_out_len);

int ems_readRvSubject(L7session_ems *p_st_sess
                    , L7_ems_packet *p_st_ems_packet
                    , char **pp_out
                    , int *p_i_out_len);

int ems_readDestination(L7session_ems *p_st_sess
                        , L7_ems_packet *p_st_ems_packet
                        , char **pp_out
                        , int *p_i_out_len);

int ems_readObject(L7session_ems *p_st_sess
                , L7_ems_packet *p_st_ems_packet
                , Ems_object *p_st_object);

int ems_skipObject(L7session_ems *p_st_sess
                , L7_ems_packet *p_st_ems_packet);

int ems_readTypedLong(L7_ems_packet *p_st_ems_packet
                    , long long *p_ll_out);

int ems_readCompressed(L7_ems_packet *p_st_ems_packet
                    , char **pp_out
                    , int *p_i_out_len);

#endif
